/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.applis.tutorial.forms;

import java.io.Serializable;

import org.apache.struts.action.ActionForm;

/**
 * This class describes the search formBean.
 *
 * It defines the both setter and getter methods for all the available fields
 * of the search form (search.jsp).
 *
 */
public class SearchPersonForm extends ActionForm implements Serializable
{
    /** Last Name. */
    private String name;

    /** Operation filter on last name. */
    private String name_op;

    /** First name. */
    private String givenName;

    /** Operation filter on first name. */
    private String givenName_op;


    /**
     * Gets the first name.
     *
     * @return The first name.
     */
    public String getGivenName()
    {
        return givenName;
    }

    /**
     * Gets the operation filter on the first name.
     *
     * @return The opertaion filter.
     */
    public String getGivenName_op()
    {
        return givenName_op;
    }

    /**
     * Gest the last name.
     *
     * @return The last name.
     */
    public String getName()
    {
        return name;
    }

    /**
     * Gets the opeartion filter on the last name.
     *
     * @return The opertaion filter.
     */
    public String getName_op()
    {
        return name_op;
    }

    /**
     * Sets the first name.
     *
     * @param agivenName  The first name to set.
     */
    public void setGivenName(String agivenName)
    {
        this.givenName = agivenName.trim();
    }

    /**
     * Sets the operation filter on the first name.
     *
     * @param agivenName_op  The operation filter to set.
     */
    public void setGivenName_op(String agivenName_op)
    {
        this.givenName_op = agivenName_op;
    }

    /**
     * Sets the last name.
     *
     * @param sn  The last name to set.
     */
    public void setName(String sn)
    {
        this.name = sn.trim();
    }

    /**
     * Sets the operation filter on the last name.
     *
     * @param asn_op  The opertaion filter to set.
     */
    public void setName_op(String asn_op)
    {
        this.name_op = asn_op;
    }

    /**
     * Reset all the value of the object.
     */
    public void reset()
    {
        name = null;
        name_op = null;
        givenName = null;
        givenName_op = null;
    }

}
